home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor2
/
hsto.doc
< prev
next >
Wrap
Internet Message Format
|
1995-03-31
|
4KB
From: cloos@acsu.buffalo.edu (James H. Cloos)
Newsgroups: comp.sys.hp48
Subject: Re: Shorter hidden-dir routines
Date: 7 Aug 91 21:05:05 GMT
Organization: State University of New York @ Buffalo
[Note: *NOT* the same as HIDE and HIDER on previous Goodies Disks.
For differences, see note at end. -jkh-]
úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
3 Mini-instructions: Syntax is just like STO, RCL, PURGE & VARS. -jkh- 3
àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù
Given that there are reserved RPL words to store, recall, and purge
variables from the hidden directory, and that programs were earlier posted
to accomplish this from the user level, I thought I'd post these three
short routines. I call them HSTO, HRCL, and HPURGE. There's also a
fourth routine that gives you the list of all hidden vars, HVARS.
Here are docs for them:
HSTO ( ob id --> )
Stores ob in id in hidden dir
HRCL ( id --> ob)
Recalls ob from id in hidden dir, Undef Name error if no such id.
HPURGE ( id --> )
Purges id from hidden dir. Note that lists are not an acceptable
arg. *PLEASE* only hpurge what you hsto. I'm not responsible
for any lost data caused by misuse of this routine.
HVARS ( --> list )
Pushes list of variables in hidden dir onto stack.
I recomend highly that you DO NOT HPURGE 'Alarms', 'UserKeys', or
'UserKeys.CRC'. I did not, however, include code to check for these and
cause an error. Just be smart. ;)
Here are the routines in System RPL:
HSTO
:: CK2NOLASTWD
:: CK&DISPATCH1
idnt StoHiddenVar
;
;
HRCL
:: CK1NOLASTWD
:: CK&DISPATCH1
idnt :: RclHiddenVar ?SEMI # 204h DO#EXIT ;
;
;
HPURGE
:: CK1NOLASTWD
:: CK&DISPATCH1
idnt PuHiddenVar
;
;
HVARS
:: CK0NOLASTWD PATHDIR HOMEDIR ID "" DOVARS SWAP COMPEVAL
;
As you can see, they are quite small. HRCL generates the same error if the
name is not in the hidden dir that RCL generates if it can't find a name.
Happy developing!
-JimC
--
James H. Cloos, Jr. "Entropy isn't what it used to be."
Cloos@CrnlThry.BITNET --c/o Fortune (PH: +1 716 866-5249)
Cloos@TCGould.TN.Cornell.EDU #include <std_disclaimers.h>
<world>!cornell!batcomputer!cloos PersonalZipCode: 14226-1111
----------
Note from Joe Horn:
If all you wish to do is hide things from the VAR menu, then these four
wonderfully fast and tiny routines fully obsolete and replace HIDE (on Goodies
Disk #1) and HIDER (on Goodies Disk #5). Note, however, that those programs
worked completely differently than this one (HSTO), and may be preferred for
some applications. Here's why.
Although all three programs seem to make objects disappear, they do so in
radically different ways.
HIDE and HIDER only work in subdirectories (not in HOME), because they "hide"
things while still keeping them inside the subdirectory. They do this by
placing a special marker in the middle of the VARS list. The HP 48
automatically "hides" all vars following that marker. (The marker is in fact
the nullname (see NULLNAME.DOC on Goodies Disk #1), which already exists in
the HOME directory, where it MUST be the final var, which is why HIDE and
HIDER cannot work on the HOME directory).
The upshot of all this is that things hidden with HIDE and HIDER are still
actually inside their respective subdirectories, and will be recalled, stored,
purged, uploaded, downloaded, etc. along with the rest of the subdirectory.
If this is what you want, then use HIDE and/or HIDER (or their techniques),
not HSTO.
HSTO, on the other hand, uses the system's hidden directory (the nullnamed
directory at the end of the HOME directory) to hide things. Something HSTO'd
is NOT still in its original directory at all; it's not only hidden, it's
BURIED! The upshot of *this* is that HSTO'd objects will NOT be recalled,
stored, purged, uploaded, downloaded, etc. along with the rest of the original
subdirectory, because they're not there! If this is what you want, use HSTO.
-jkh-